how to make priority queue of pairs in java

108

how to make priority queue of pairs in java -

PriorityQueue<Pair<Integer,Integer> > pq=
                new PriorityQueue<Pair<Integer,Integer>>(n, Comparator.comparing(Pair::getKey));

Comments

Submit
0 Comments